/*
 * SpecialFunction.h
 *
 *  Created on: 21/nov/2010
 *      Author: computer
 */

#ifndef SPECIALFUNCTION_H_
#define SPECIALFUNCTION_H_
#include <boost/math/special_functions/gamma.hpp>
#include <boost/math/special_functions/zeta.hpp>
#include <boost/math/special_functions/erf.hpp>
#include <boost/math/special_functions/beta.hpp>
#include "Real.h"
#include "Integer.h"

class GammaI {
public:
	TreeExpression::Real* operator()(TreeExpression::Integer* a) const {
		return new TreeExpression::Real(boost::math::tgamma(a->getData()));
	}
};

class GammaR {
public:
	TreeExpression::Real* operator()(TreeExpression::Real* a) const {
		return new TreeExpression::Real(boost::math::tgamma(a->getData()));
	}
};

class ZetaRiemannI {
public:
	TreeExpression::Real* operator()(TreeExpression::Integer* a) const {
		return new TreeExpression::Real(boost::math::zeta(a->getData()));
	}
};

class ZetaRiemannR {
public:
	TreeExpression::Real* operator()(TreeExpression::Real* a) const {
		return new TreeExpression::Real(boost::math::zeta(a->getData()));
	}
};

class ErrorFunctionI {
public:
	TreeExpression::Real* operator()(TreeExpression::Integer* a) const {
		return new TreeExpression::Real(boost::math::erf(a->getData()));
	}
};

class ErrorFunctionR {
public:
	TreeExpression::Real* operator()(TreeExpression::Real* a) const {
		return new TreeExpression::Real(boost::math::erf(a->getData()));
	}
};

class BetaRR {
public:
	TreeExpression::Real* operator()(TreeExpression::Real* a, TreeExpression::Real* b) const {
		return new TreeExpression::Real(boost::math::beta(a->getData(),b->getData()));
	}
};

class BetaRI {
public:
	TreeExpression::Real* operator()(TreeExpression::Real* a, TreeExpression::Integer* b) const {
		return new TreeExpression::Real(boost::math::beta(a->getData(),b->getData()));
	}
};

class BetaIR {
public:
	TreeExpression::Real* operator()(TreeExpression::Integer* a, TreeExpression::Real* b) const {
		return new TreeExpression::Real(boost::math::beta(a->getData(),b->getData()));
	}
};

class BetaII {
public:
	TreeExpression::Real* operator()(TreeExpression::Integer* a, TreeExpression::Integer* b) const {
		return new TreeExpression::Real(boost::math::beta(a->getData(),b->getData()));
	}
};

#endif /* SPECIALFUNCTION_H_ */
